<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on指令</title>
    <script src="vue.js"></script>
    <style>
        .styleMe{
            width: 100px;
            height: 80px;
            border: 1px dashed #000;
            border-radius: 50px;
            background-color: aqua;
            margin: 30px 0;
        }
    </style>
</head>
<body>
    <div id="app">
        <button v-on:click="clickMe">单击我</button> 
        <button @click="clickMe2">打我</button><br>

        <div class="styleMe" v-on:mouseover="changeMe" @mouseout="changeMe" v-show="isShow">
        </div>
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            isShow:true
        },
        methods: {
            clickMe(){
                window.alert("我被单击了");
            },
            clickMe2:function(){
                window.alert("我被打了");
            },
            changeMe:function(){
                this.isShow=!this.isShow
            }
        },
    });
</script>